Moving global vars into a global object.