Refactor enumeration.