Cleanup utility functions, add support for map<K, V> -> str.