Switched to TreeMap as we need ordered dictionaries