Working prototype for using matplotlib
Some small changes to stats png generation
Some minor tweaking of templates