Added additional methods to support the flags param in all iterator
modes.  Thanks to Igromanru.
Removed unnecessary init.
Better handling of addAll() which should have been doing the same thing
as add().  Thanks to Igromanru.