usr make some fixes and adhere to PEP8