Got the edit function to work.