Pylint fixes

Few were real bugs, others just needed a bit better code