Save and delete button functionality