Made major changes to NaiveBayesClassifier