First steps to rewrite the chat for unsing classes