Added comments to RNG code