Caching and template tweaks.