Added iterated removal of reference