Cleaned up and ran though flake8