Beautifully written server code!

Just added some comments and small changes