Fixed NBMC cleanup loop bug. Moved some functions from naivebayes.py to mathematical.py.