Clean up example logic using graphemes/pattern matching