Implemented the edit and update actions with associated views and routes.