So, lately I've been working on these comedy novels for kids, and one of the interesting things about writing farce is that the rules are pretty open about things like coincidence, characters suddenly changing their minds, etc. BUT, some rules are pretty tight. Such as, callbacks.
Like, suppose you have a scene where someone gets hit with a pie. That might be a little funny. But if the pie was established as existing 5 chapters earlier it's MUCH funnier. Note that this is true even if nobody said "that pie took me ages to make, so I hope it stays okay!"
There's a scene in Wodehouse's very best book, The Code of the Woosters, where the Brute characters gets socked in the face. This isn't funny because of the violence. It's funny because wayyyyy earlier it was established that this other guy was waiting to jump whoever entered first.
And I think some of the humor is of course that he socked the wrong guy. But also it's just funnier if you heard about it earlier, so it's not ad hoc. I don't really understand why this is! But I feel like it's the key thing to Wodehouse's best moments.