appserver: cleanup main.c