Moved background worker out of Script object so that script can be run in current thread if so desired.