Some PEP8 fixes pulled from another PR to ease merging