Refactor code into ConversationWidget