Refactored logic into an enum

Refactored using an enum, there is still the ugly display part to handle