Revert "Replaced enumerations with an extensible type"

This reverts commit 8a8d9cdd126cb4d63cb812afab866711ee92c79e.
Smarter enumeration types