Wouldn't it be more efficient to just get rid of all internal state without iterating over all nodes? Just wondering...