Ironed out all the compile errors that were caused by adding headers to ...

...CURL.  Also changed some API calls to be compliant with the new API.