Implemented big parts of cURL