Improved the handling of multiple runs, making them deterministic. Added
the Mersenne twister.