when william herschel wrote his catalogue of deep sky objects, he used the name "spiral nebula" for objects like the andromeda galaxy. 200 years later astronomers discovered that they are made of stars as the milky way is, so the term 'nebula' is now only used for diffuse structures within a galaxy.