remove unused scripts from template