Refactored the edit erb to use form for. Also refactored the action of update.