Reworked plotting output and looping

Streamlined, to some extent, the plot output file generation.