Refactor for new chat system in format