PEP8 compliance

Most of this commit is harmless, however there are some things to be careful about:
- Removed unused imports.. they appear unused but can be used from modules that depend on ours.
- Splitted some lines inside very large HTML code
- Changed an assertion from "assert [condition] == False" to "assert [condition] is False". It's not the same, but in this case seemed fine for me.

At last, I got bored fixing PEP8 complaints on the tests, so I didn't finish there, sorry :)