refactoring module system