Remove all direct global references from source files.