Whenever I see blocks of code with their own documentation, they make me think they are ripe for being broken out into their own functions for clarity, documentation and ease of testing.