Removed some uses of raw c-string manipulation functions.