RNG/misc improvements