refactor all core classes into one module