Re-factored 'chat()' to become understandable and maintainable as