What are the main functions of the mitochondrion within a cell?