Part of the events seen in the movie are taken indirectly from the book "Life After Life", written by Dr. Raymond Moody and published in 1975, a series of compilations about people who by a brief time were dead and later lived again, called NDE or Near-Death Experience. Between them, the concept of a light white tunnel, which appears when a person dies to take his soul to the Afterlife (in the movie it appears three times: when Sam dies, when a man dies in an operating room, and when Sam saves Oda Mae and Molly, completing his unfinished business). The second part is the idea of black spirits who capture the souls of bad people to take to other side of the Afterlife, called Lower Astral, a place similar to Judeo-Christian Hell to punish and torture them. The third part is people, maybe friends and familiars, who wait to receive the recent dead to the Afterlife. It is showed when Sam walks toward the Afterlife at the end of the movie, where he mixes with a lot of spirits who wait for him (as they appear in diffuse figures in blue, it's impossible to know if they are Sam's friends or familiars).