More stuff moved to util.
Added GibbsSampler.