Fix a few pylint complaints.
Fix broken tests.