Finished fixing up randomizer and improving code.