Use more emplacement and initializer lists.

And change a few function return types and vector value types
from string to const char *, to reduce copying.