added background thread class for speeding up execution of pre-processing, changed run script to use entire dataset