Wrote basic test and fixed bugs.

Wrote test script (test.py) to test simulation iteration, which exposed bugs relating to the mixed use of sets, lists, and dictionaries. All data structures have been swapped to lists now, and appropriate code has been updated (eg, replacing 'add' with 'append'.