Certain traditional Daoist ideas were retained in Lingbao cosmology, such as the idea that the world originated from a type of primordial "qi" known as "yuanqi", and then was divided into heaven and earth. Furthermore, the "yuanqi" is subdivided into three types of "qi" that correspond to three deities: the lords of the Celestial Treasure, of the Sacred Treasure and of the Divine Treasure. These three deities later introduced the teachings of the "Dongzhen" (Perfect Grotto), the "Dongxuan" (Mysterious Grotto), and of the "Dongshen" (Divine Grotto). These three teachings form the basis for the later classification of texts in the Daozang.