[Core] Be pep8 compliant and improve lisibility of the code (fixes #16).

Improve the lisibility of the code and import. Be pep8 compliant. It will
certainly have to go around again but we'll see next time. Tests pass, but take
time to execute on this machine Ran 46 tests in 220.579s maybe we can look this
part also.