refactor enum code - don't pull yet

I just want the auto-tester's opinion.