Some fixes

By using it for a proof of concept, we found and fix some issues, here is the pull-request.

Maybe one change will be more controversial, we use CurlAsyncHTTPClient instead of the default one for performance reasons but it requires pycurl which require curl header. Maybe surround it with try/except, what do you think?

This pull-request also include @cheungpat changes as I've used his fork as a base.