remove unused scopes