restructure detection of undead daemons a bit