What are the parts of the leaves in internal and external and their functions?