refactoring some module structures