Newstyle wed

Fixed errors in segmentation and updated the notebook.  Segmentation by distance is still not functioning as expected, but segmentation by count is.