Yeah, Hamlet being haunted by his dad was soooo lame. ;)
I presume what was left of Anakin vanished between Luke dragging him onto the shuttle and escaping the Death Star. Lucas said somewhere the armor was empty when Luke burns it. Had we seen the body vanish in the movie, that would have spoiled the ending a tad...
If it's the usual retcon by George, one can presume Ben and Yoda helped him cross over. Qui Gon didn't vanish either.