Use a new UniqueId class instead of strings to represent uids.