I am not sure if folding it in like that makes it any easier to read. I'm not trying to go for DRY so much as smaller chunks.   I'll upload something that is organized better, you can see if it is any more difficult or easier to follow.