Lots of small template tweaks.