Improved randomisation.
Merge pull request #5 from RichardMoran/master

Improved randomisation.