bayes cleanup