Remove keys and scopes