Refactored everything so that JSON returns the task, not the server