better PEP8, various tweaks