Code quality fixes to be more PEP8 compliant