More work on chat system.