The leaf consists of a waxy outer layer called the cuticle that helps keep moisture in the leaf. Underneath the cuticle is the epidermis. The epidermis provides protection and also helps to regulate the gas flow of CO2 and O2 in and out of the leaf through pores called stomata. The epidermis is transparent to allow light to pass through. Beneath the epidermis is the internal layer of the leaf called the mesophyll. It has two parts, the upper palisade layer and the lower spongy layer. The palisade layer has cylindrical shaped cells that contain many chloroplasts for photosynthesis. These cells receive the maximal sunlight which is why the chloroplasts are located there. So the palisade layer in the mesophyll gets the best exposure to the sun.