Refactor to decrease coupling.
Partial refactor.