Limestones are mostly made of calcium carbonate. It is originally made by small photosynthetic protists like certain bacteria, coccolithophores, and algae. Then the carbonate gets used by various animals, like bivalves and the polyps which make coral reefs. They build their shells or framework out of CaCO crystals. 