Ordered a little the code AND added orders to save plots and send output to output files