more work and tests for AppWindow