Added Seeding to Random Number Generation

Updated the sampler to use pseudo-random number generator with seeds
instead of Math.random().