Windows now work properly, terminals partially work
I still need to fix some window behavior. The old terminal code worked almost perfectly with the new window code, and with almost no refactoring.