Remove unnecessary LinkedList.