Added strategy and factory pattern to URL-handling