Improve readability by utilizing enum

Make use of enums being first class objects and add isAction method to
simplify code and improve readability.