New coding style
fixed bad condition with http client
added api v3 support