Temporary fix for Ajax response

For some reason AjaxResponse isn't working. Go back to directly encoding the response ourselves.