refactor RegisterEngine to RegisterTemplateEnginer