removed weird copies of files, parallelized some functions