Refactor path of templates.