Removed more logic from tmpl