fixed flakes and pep8.