Improved window handling : 1 only window + window close event handling