Updated dialog response method put the response in an object
Changed memory to use peak usage.
Made the content-type parser more reliable