Refactoring. New way to detect method's scope.