document util.h; refactor a bit