updated all code to be (almost entirely) PEP8 compliant