String simplification