Made some changes to Enum that allow it to be type-safe, as was discovered
to not be the case before. Actually makes the class much simpler and
cleaner as well.