Created an abstract class to simplify the creation of Iterators