Refactor UrlFactory and adding basic support for HTTPS to the XML Collector.