Here's how it should have ended...
First let me say I know it has to be true to the book but...
Here's how I was expecting it to end.
Leonard, try as he might is having real trouble finishing the novel. What with struggling for ten years and now a stroke.
Heather being so in tune with Leonard and his former works, in the end comes to appreciate his later works by long, in depth, discussions with Casey.
Heather then rekindles her friendship with Leonard and acts as a vehicle through which Leonard finishes his novel. Heather at last gets to read it before publication and draws the essence of the novel from Leonard.
She uses her laptop to rapidly enter the text. They mutually review and revise it. The final novel evolves into his best work yet.
I'm still waiting for this ending...