Added XML request type, ability to override the response type by including a parameter output_type, updated test cases, improved error handeling