Define USING_MEMSINK where appropriate.
Fix signedness errors.
Fix stop type.
Partially functional and documented RangeIterator.