Improved random number generation by using standard classes and initializing with a seed.