Changed from using pure dicts to arrays with dicts.