Updated svm related functions.