Some tweaks to response handling, particularly JSON. Added chainable `header` method to response.