Chloroplasts are organelles found in plants and algae that carry out photosynthesis. They have an inner and outer membrane, with an intermembrane space between them. Inside is the stroma, which contains thylakoids that are arranged in stacks called grana. Chloroplasts contain their own genome and divide independently. According to the endosymbiotic theory, chloroplasts originated from cyanobacteria that were engulfed by other cells but not destroyed. Chloroplasts import most proteins from the cytosol through translocation complexes in the inner and outer membranes. They perform photosynthesis through light and dark reactions, using solar energy to fix carbon dioxide and produce oxygen and carbohydrates.