Random improvments around string construction.

Signed-off-by: Frank Mertens <frank@cyblogic.de>