Refactored long function: timer.DeadNodeScanner_deadNodeScan() to make it more testable, and easier to understand