Getting started with episode 3; enabling closing the window.