major rework to support Jersey client. Still need to go back and fix HttpClient