Added stat box controls, better TH1 checking and plot storage in a root file