Moved the iterators and rules utility class into the library.