Fixed some javascript placement errors and cleared up the edit form