Ran PyCharm "inspect code" - many fixes resulted