Removing unneeded internal anchors