#267 Add cascade delete to algorithm.