testing improvements
fixed CURLOPT_POSTFIELDS to correspond the test
fixed tests
improved architecture