Refactoring AbstractBase#setTemplate()