Minor cleanup in utils.py