Various bugfixes.  Enables windowed mode