Refactoring: Moving variables to inner-most scope.