Exit on window close and create a selection box