Replace some old string handling routines