Adding unit test with 100% code coverage. Adding test for each url scenario. Refactor url connection to use user agent.