remove unneeded script elements for templete