Improved document based app's windows (Fixes #4)