Refactoring enums