Refactoring: moved some classes and methods