Simplified removing of repeated chars