Various small code cleanups for higher PEP compliance and easier to read code