Define methods on the controller, not on scope