Changed the modal close function to be tied to the ’Save’ button