Updated distribution code to give .csv output

Some of the output was removed in order to speed up the program's
execution, and the final data is now directly given as a
comma-separated-values file.