More refactoring.  Fixing refs to static vars with 'extern' declarations.