Code cleanup to reflect flake8 standards