Fixed problems with loading the default view  when opening a window plus a few small fixes.