Removed some var_dumps and added the header(Content-Length) parameter so that the browser stops loading