#145 refactoring some classes