cleaned up http code, fixed problem with returning http headers in body