major module refactoring