Refactoring: Added a "ChatConnection" interface.