Moved Urlparse into a separate source file.