[Refactoring] scope.c