Added some testing code for rng()
Minor cleanup