Updated the WikiTableScraper class with the new algorithm