Added initial bayesian inference code. Buggy, does not work.