Stats template update

* Conditionally fetch stddev and totals
* Cache template for longer