added: unit tests, test harness (calling as module); changed: location of utility functions; consolidated: client send functions