Fix previus request for ST3 

Hi, for me prev pull request broken ST2 support in line 75 return always None
I think in my pull request code more clear. I check its in ST2 and ST3. Also i fix many pep8 warnigs.