Curl now has his own class

Preparing to change curl by curl library.

Fix some bugs