Simplified template rendering, removed redundant string casting