cleaned nditerator.h code up