Organize code and add subtraction to svm generator.