Remove all unsued elements.