Refactor to conform to PEP 8