Reformatting to resolve most PEP8 warnings