Fix the insert operation to use the correct order. Fix the map iterations to use the DB directly, instead of the buffered transaction.
Util to convert ISO strings to UTF-8 ones.