Fix various pylint errors