PEP8 fixes.

Changes too from 'foo is not None' to 'foo'.
Some other few changes though (reworks on few if statements for instance).