Randomization and other improvements
Merge pull request #2 from kwsch/master

Randomization and other improvements