Replace the switch values with an enum, just to make things cleaner