Major updates to svm script