Remove unused $template.