Porting chat-client to what we want