Implemented a faster Gibbs sampler.