Added update functionality to the edit page.