Added foreach to dictionary

You can now call a callback function on each object in a sim dictionary
easily.

Also fixed some spacing.