Adjusted code to more closely fit pep8