Templating tweaks by Tim