Backend code for edit and delete tasks. Frontend is next.