Fix unit tests (my sed was a bit violent)
Fix pep8 and coverage