Fix some unit tests.
Fix sampling so that it doesn't require init params