Refactoring scopes