Added variant which tries to be like CURLHandle, so I can revert the original to something simple which could be submitted to libcurl.
Simplified gcd example