What is the main function of mesophyll tissue of leaves?

What is the main function of mesophyll tissue of leaves?