Implemented full chat functionality