fixed a lot of minor glitches thanks to Pylint