Dialogs are always in the middle of the code in every RenPy game, but this code is particularly complex due to those layered images (take into account that there are 3 characters on this particular scene), and the game is designed so those poses change after every dialog line or action. It's their problem the code is so bulky, sure, but that's just how they chose to make this game more than four years ago, and also a big part of its success because it almost looks like a fully animated game. I don't think most of complainers are really aware of this game's actual complexity.