cleaned up bayes.py