added BackgroundWorker, code formatting/cleaning