A little design cleanup on the global variables.