Added functionality to the edit page.