Changes to use two different dictionaries (one for names, one for types)