Refactor Try blocks.