Added SetCurl function to set the cURL instance externally and added checked to Connect so that if cURL is initialized it doesn't get overwritten