Improving template engine