Complex sentence: Despite its comedy, he discovered that there were elements in the text "of debauchery" that brought out a core darkness, and while influenced by the visual nature of film he decided to permeate a motif of sexuality into the script.
Split into simpler sentences: Despite its comedy, he discovered that there were elements in the text "of debauchery" that brought out a core darkness. While influenced by the visual nature of film he decided to permeate a motif of sexuality into the script.