Isolated window opening from main function