Randomness and fixes

Randomness now fully reproducible. Hashes for agents should now be
properly unique.