Refactor enums

Hi Stephen,

Refactoring enums as requested.

Thanks
Tom