Reduce redundant string generation