removed unused class, refactoring, added tests