Move some things to be globals so that we don't keep passing them constantly.