removing duplicates from sliding cursors

- added sanity checks to functions.
prune.