Cleaned tests in search of all pyflakes and most pep8 errors