Rewritten using iterators and object inheritance.
Fixed path in ChangeLog.