Added threading for cURL