Refactor enums used in front end