Refactor dependencies between modules.