Add multiproc and cleanup to data.py

I added some code to make the data.py script multiprocessing so that I can run
it over multiple processors. I may still have to do some tweaking so that it
can run in interactive mode, though.

Also did some cleanup of the code. This didn't change the functionality at
all.