Renamed variables for clarity
Splitted a method
Added ability to configure HTTP user agent
Added a default user agent for HTTP clients