Improve string handling