Add new method to get variables declared in scope.