Added the scripts 'as is' as well as some Bayesian theory.