Randomization and other improvements

Fun stuff.