The mesohyl functions as an endoskeleton in most sponges, and is the only skeleton in soft sponges that encrust hard surfaces such as rocks. More commonly, the mesohyl is stiffened by mineral spicules, by spongin fibers or both. Demosponges use spongin, and in many species, silica spicules and in some species, calcium carbonate exoskeletons. Demosponges constitute about 90% of all known sponge species, including all freshwater ones, and have the widest range of habitats. Calcareous sponges, which have calcium carbonate spicules and, in some species, calcium carbonate exoskeletons, are restricted to relatively shallow marine waters where production of calcium carbonate is easiest. The fragile glass sponges, with "scaffolding" of silica spicules, are restricted to polar regions and the ocean depths where predators are rare. Fossils of all of these types have been found in rocks dated from 580 million years ago. In addition Archaeocyathids, whose fossils are common in rocks from 530 to 490 million years ago, are now regarded as a type of sponge.