Centralizing the template execution logic in one place