Complex sentence: Originally, the Mother Abbess sings the song at the end of the first act, but when Ernest Lehman wrote the screenplay for the film adaptation, he shifted the scene so that this song would be the first major song of the second act.
Split into simpler sentences: Originally, the Mother Abbess sings the song at the end of the first act. When Ernest Lehman wrote the screenplay for the film adaptation, he shifted the scene so that this song would be the first major song of the second act.