Added multi-window functionality