Update to use dicts properly