More refactoring!
MDI support.