More code speedup, also make use of the BackgroundWorker.