Copied and edited base code to controller and view.