Add shutdown hooks for servers. #13