changed internal Task<string> to Task<HttpResponseMessage> and minor fixes