Clean up scopes.