refactoring and getting rid of classes that are not needed