Refactored code and added some Enum values.