templates refactoring, remove deprecated