Refactor string functions, fix many defects.

Is there no default now then? Shouldn't default exist and log a warning?