classifier training changes and factoring out of some tests