Minor mods to dict.py