PEP8-ified some of the code