Refactoring for type/module pattern.