Added tests for many distributions. Fixed a bug in RNG.