Long ago, all animals looking like worms were lumped together by John Ray and by Linnaeus in their classifications. Later, biologists found that some were in quite different groups. Roundworms and flatworms are different phyla. Inchworms are a type of caterpillar, and the slow-worm is a legless lizard.