Work on elegantly closing sockets.

- Pings work now.