Clean up global variables (part 1).