PEP8 formatting and misc tweaks