cleaning up bayesact codes