Refactor some scopes