refactored deduplicate and update_scraper_stats scripts