Cleaned up `server.rs`.

The last revision of the server was a bit sloppy. I reread the rust documentation and grokked with the types a bit more to make the code a bit more concise and a bit more functional.