New Window methods + fix beginMainLoop in example