Changes from Base to BaseWindow. Some other code fixes as well.