Various changes

:warning: Don't merge yet.

My main goal for this pull-request is to make enumeration restrictions use the constants instead of hard-coded string values. So far I have not completed that.