Fix deprecation warnings in templates.
Merge pull request #6 from rjw1/fix-templates-deprecation-warnings

Fix deprecation warnings in templates.