Cleaned tests file to correct all pyflakes and pep8 errors

I'll revert back to original. I'm +1 to better docs.