PEP8 Fixes and comparison chaining simplified.