Refactor modules.