Before scope refactoring