Make code more PEP8 compliant & Pythonic