Made fixes to utils.py to conform to PEP8