Chat client restructure