removed unused classes, some refactorings