Refactor the controller to standalone functions in accordance with best practices: https://github.com/toddmotto/angularjs-styleguide