almost not important changes to client-side chat implementation
fixed merge problems