More chat refactoring.