cleanup, extracted servod.c