strip out public api for term/json building functions. not mature yet