Reinstated some util functions that are still being used
wrote at least some doc for each func in util