Added a seedable random number generator.