Fixed curly braces. Removed redundant method set_useragent()
Styleguide fixes