Started work on rewriting server code.