Remove some global variable uses.