Improved handling of names when generating a new extension using the template