Fix Logic on conditionals, More PEP8 Fix

- Fix Logic on conditionals.
- Fix PEP8 ~80 characters per line.
- Fix PEP8 Unneeded trailing backslashes between two parentheses.
- Use builtin isinstance() instead of type(obj) == type("")
- Fix PEP8 Use is instead of ==
- Alphabetical Sorted all Imports.
- Comments are not removed, just moved up if they are too long.


I try to keep the Diff not tooo large so its easy to review  :smile: