Tweaked randomization and slight improvements.