removed testing stuff
added server shutdown handler