Help me understand Kadosh? (Spoilers?)

My wife and I just watched Kadosh last night. This is a movie placed in an Israeli Orthodox community and deals with issues of sex, infertility, and most of all the power of community/traditional rules over indivdual better judgement. Love doesn’t conquer all. Maybe I had a hard time because of white subtitles over white backgrounds but both my wife and I got confused in the last third and really don’t know how it ended up.

From where Rifka is given a get by Meyer at his father’s insistence, and especially after he comes home ?drunk? and wishes Happy Purim to ?Rifka? ?Chaya but he thinks she’s Rifka? and especially the final scene. Huh? What happened there?

Anyone else seen this and able to help me out?