Improve string stripping.