Update chat_server

Finalized everything and added comments