Using sorted-map for keys and changes.