Classifier refactor