Refactoring: replacing boolean by Enums