Added premature exit functionality if all cells are dead. Completed comments.