Original: Mozart and Varesco were commissioned in 1780 by Karl Theodor, Elector of Bavaria for a court carnival.
Simplified: In 1780 Mozart and Varesco were asked by the Elector of Bavaria to write an opera for a court carnival.