cleaning up pyutils.py