Got rid of the global vars in main, #hateglobals