Refactoring Chat