Reference cleanup.