some tidying up for the edit form