Refactored response handling for JSON.  Now in own class.
Also provides for 'envelope=true/false' parameter to suppress the envelope on the JSON