improved: GUI sizing and control when user closes windows (by click on X)