Added logic to automatically close that annoying demo window. The exit conditions for the loop should be revised and a cancellation token added to prevent a runaway thread if the window never appears.