Which processes occur in the stroma and which on the thylakoid membranes?