u/jbosch/DM-1188

Changes here are really just to adapt to changes made in the shapelet package, and I've tried to do them here in a minimal, rather than maximally-efficient way, because this whole package is hopefully going away with the S14 release.