added church code for bayesian thompson sampling. Needs some minor fixes