I own idea of 'undead' is that there is a difference between intelligent and created undead.
'Unlife' is intelligent and truly evil. They never really died, but they extended their life into... unlife. And they pretty much want to kill anything living and absorb them into their little army or whatever. In this case I'd say the elf slaying weapon would still work on a elven lich or vampire or something along those lines.
'Undead' are created by the Unlife and are, essentially, unintelligent. It's what a Lich or Necromancer would create and give a general imbued behavior pattern or controlled by their creator. They aren't actually evil in and of themselves, but they were created by evil and so generally considered such by default.
Spirits are different than the above (ghosts for example) and are, typically, the same level of good or evil they were when living.