Added update task and some model-related logic for PUT req.