Use a TreeMap to preserve key order.