Converted globals from Map to dictionary in order to maintain scope.