Added comments to chat.c