cleanup string code