There must be better ways to bind Yodii to the Closing of the window. Seems to work nonetheless.