removing main spec
adding an enum type, refactoring and tests