t806: Hook up to server (logrus); miscellaneous cleanup; add unit tests