Added live/dead logic.
Merge