Scoop out the body of the block into a function. That does not nest deeply.

Then structure as jb4 suggested.

Disadvantages: function call overhead and one layer of indirection. Advantages: separating "what" from "why" often leads to better modularization.

Cheers,
Ben