Refactored Edit method of RESTful CRUD