fixed many minor glitches thanks to Pylint