I was wondering how Beckett has such a nice NY loft on a detective's salary.
Because she's a TV protagonist.
As soon as we learned that the victim was giving his money away out of guilt and talking about the past catching up with him, I said to myself, "He stole the lottery ticket." Wasn't that hard to figure out. So this was one of those episodes where the key clue is easy for the audience to catch (at least for me) but the characters don't even consider it until late in the game so that they can pad the mystery out to an hour with a lengthy string of false leads. And this case was more elaborate than most, with all sorts of suspects and motives piled on to an implausible degree. (Well, not that much more elaborate than typical for this show, but still.)
But that was a wonderful thing Castle did at the end, endowing that scholarship to honor Beckett's mother. I'm getting misty-eyed just writing about it. It's a wonderful gesture of love.