major classes refactoring