Added ability to run many simulations in one run, and write the results to a file for analysis.