Added globals and such