Refactored. Added auto-generation of plots with matplotlib.
Moved parameter fetching to where it's needed, vs. passing as par
Removed logging of some info, as too much data was stored to disk