Enumeration refactoring