PEP8 fix and removed dead code