Tabs and windows

Open and close window functionality. Chat history moved to window
specific.