fixed and improved MainWindow.
separated the document panel as DocInnerWindow.