begin writing referencetype tests
more enc/dec/tests; listen tool; selective test via arg
remove reply/error distinction
expand comments; add tests