GH-16 Fixes and clean-ups in the templates.