Refactored the classifier and testing scripts a bit