Refactored arrays to dictionaries.

*  Associative structures using the id for the key.