Changes to controller and JS for save and load