Refactoring

Proper use of enum