Clean up code for parallelizing file processing.