Improves to the controller handler and unit tests.