Some documentation updates.
Add ability to sample random distributions nonuniformly.
Add unit tests.