I agree with most of what you said, but do have a few comments:
I know that I'm me and I agree that this sense of self is a product of my function and experience. But since I'm (and I assume everyone else is too) aware (that is, my my function and experience contain references to itself and the environment around me), then this poses a small problem: if I duplicate my function on different hardware (another body), will this merge into my current function? Logically, no, there would now exist two instances of the one function and unless both are subject to the exact same external forces, the experiences would quickly diverge - meaning there are now two different people with two separate awarenesses. Since my original awareness exists separately from the new one, then that is not me.
For this reason, I do not believe that the immortality depicted in some science fiction (cloned body with memories implanted, which I believe could potentially be possible in the distant future) would ever actually work - because that clone is not me, that clone has its own sense of "self", I'll still die when my original body dies, theres just someone else alive with the same memories and mannerisms as me, but its not me, its a copy.
Continuing on this train of thought, it makes sense, to me, that by limiting the function (perhaps by restricting its inputs or by removing it altogether) that you can end up with Zombie bodies. I'm too tired to think about what implications this may or may not have, however.