A little more cleanup work in templates