Remove unused and untested scopes.