Simplify and clean up chat example