Added option to rename templates

Fixes #1723