refactorings and some classes