Bayesian detector implemented; other misc changes