Fixed iterator and other small changes.