Refactor into multiple modules.