First pass at SVM.  Error checking next