Everything is now PEP8 compliant, I also made it so that no globals are used unnecessarily.