Fix some of the errors pointed by pylint