Added before/after functions to the iterator to allow inserting nodes.