Re-inserted code for updating values when Submitting button is clicked.