Fix dialog system to be based on a map.