Refactor the code to follow pep8 style guide