This is more verbose, but also much more clear (and so allows to remove some previously necessary comments). No real changes, even keep the same values for the enum elements as were previously used: this is probably unnecessary but do it just to minimize changes.