Comments.
Save the settings when the user quits by closing the window with the close button too.
Save the main window width, height and maximised state.