eliminate util package in src/main

since util packages are a smell. most stuff moved to api package. this is a
postive advance now that we have a core package which does not depend on api.

also accomplished by removing some unused code

not sure what to do about src/test/util, so just leaving it for now