The stems are green to make food for the plant, because the leaves can't do it any more - they are too small. Cacti stems and ridges expand to store lots of water ... tip and stringy leaf margin ...