name2sex now is supplied a dictionary rather than relying on the dictionary interanally.