Added 'exit' code to WindowObj