Make the iterator a little more general purpose by using a pointer to a handle