Core classes refactoring part 1