The spirits are classified according to the purity of their lives and their obedience to the will of the Lord while on earth. According to the prophet Alma, the righteous spirits rest from earthly care and sorrow. Nevertheless, they are occupied in doing the work of the Lord. President Joseph F. Smith saw in a vision that immediately after Jesus Christ was crucified, he visited the righteous in the spirit world. Priesthood holders continue their responsibilities in the spirit world.
Family relationships are also important.
He said, 'When I looked at families, there was a deficiency in some, . . . In the spirit prison are the spirits of those who have not yet received the gospel of Jesus Christ. These spirits have agency and may be enticed by both good and evil. If they accept the gospel and the ordinances performed for them in the temples, they may prepare themselves to leave the spirit prison and dwell in paradise. Also in the spirit prison are those who rejected the gospel after it was preached to them on earth or in the spirit prison.