Removing unnecessary hidden list items.