Add scraping of history in background thread

Add scraping of history in background thread