Added a new class for back-ground working

The new class BGWorker can simplify code when we need a back-ground thread/job.