Refactoring: breaking i into hoi (higher order iterators) and itk (iterator toolkit)