Code cleanup to conform to PEP8