Refactor and tests for Controller