Further cleaning up of handler functionality. server.c should now be
free of handler code.