Fixed a few warnings
Added missing includes for VS2013
Cleanup curl init/cleanup