Refactered the WebCrawler code