CleanUp and Use a global random number generator
CleanUp
Add a unit test of block