Refactor to pep8