Remove disabled code and PEP8 cleanups