Fixed bugs, basic gibbs sampling now works