Code refactoring. Event connections of the chat controller moved to inside of one.