Refractor Logic and Controller to reduce coupling.