Changes to the controller and template