util.py decrufted and documented