Changes to controller and js file