string code cleanup