Get rid of all globals hopefully