Massive type module refactoring