Added tests for error classifications

Also fixed a small problem in the classifier.