This reverts commit 21d9f36781.
21d9f36781
- also, add unit tests for various functions in util.cpp/util.h