Hi TWE
I agree that people who did good can go to heaven, but not all will
go heaven. It also depends on their vow and intention.
The pain of the person when dying is beyond one's endurance. I
heard cases when doctors used electric shock or other method to
save a near death patient. After the patient die, the doctor had a
nightmare when the dead person came to struggle the doctor because
during the treatment the patient has suffered very severe
pain.
Though a person might do some good thing in the past, but if he
grow hatred when he die, this will create bad karma. On top of
that, he won't be in the same frequency to upper rebirth, so his
bad karma will ripe first.
Anyway, this is for those people who don't do much good nor bad
karma when they alive like everyday eat and sleep, never develop
compassion, never harm people, then their next rebirth will be
determined by their mind/attitude during dying process, whichever
is stronger.
Remeber that karma is not created just through body and speech
only, but also through mind.
In sutra, it state that one can clear off bad karma by doing
repention, regretting of the bad deeds that we do in the past.
Likewise, if one regret the "good deeds" that he do, it will have
negative impact to himself.
So, in a way, both side are correct, their understanding on this
matter is also according to the dharma.