Fix some pylint errors/warnings