Refactor source code to adhere to PEP8