Scott at 2015-07-03 02:08:16:
I don't have time to do a complete sequence analysis of the script, however it strikes me you can break down the story into four parts:
1. Barney's marriage with Clara
2. Barney's marriage with The 2nd Mrs. P
3. Barney's marriage to Miriam
4. Barney's descent into Alzheimers and death
Instead of Four Weddings and a Funeral, this is Three Marriages and a Cemetery.