small refactoring in some classes