 From the time of Horemheb, tombs were decorated with the Book of Gates, which shows the sun god passing through the twelve gates that divide the nighttime and ensures the tomb owner's own safe passage through the night.These earliest tombs were generally sparsely decorated, and those of a non-royal nature were totally undecorated.Late in the Nineteenth Dynasty the Book of Caverns, which divided the underworld into massive caverns containing deities as well as the deceased waiting for the sun to pass through and restore them to life, was placed in the upper parts of tombs.