Some server improvements.

Server can now be gracefully shut down with a "Cntrl-C".