Change types from integer to enums
Bind units using a switch statement