Cleaned up Bayes code.