Adds in the new iterator interface.

Also fixes several bugs that were causing rows to be dropped.
Refactors the rget unsharding function.