Extracted chat into separate class. Client side refactoring.