Rewrote the server.

We now have all the features I ever wanted.