remove unneeded scopes