Flesh out the dialogue Javascript implementation a bit.