Improve test coverage

Adds tests for controllers.