finish cleaning up and adding documentation to all files in lib/util