Fix python warnings and make pylint more happy.