Chatroom refactoring