Purcell did not set any of Shakespeare's text to music; instead he composed music for short masques in every act but the first. The play itself was also slightly modernised in keeping with seventeenth-century dramatic conventions, but in the main the spoken text is as Shakespeare wrote it. The masques are related to the play metaphorically, rather than literally. Many critics have stated that they bear no relationship to the play. Recent scholarship has shown that the opera, which ends with a masque featuring Hymen, the God of Marriage, was composed for the fifteenth wedding anniversary of William III and Mary II.