Stopped passing in globals to a couple of functions.