removed unnecessary specs and some refactoring