Implemented leaf node iteration.