make some fixes and adhere to PEP8