Refactoring && ChatClient implementation