Added template processing utilities