Structure of 24Mg Excited States and Their Influence on Nucleosynthesis