This don't belong here, should stay in ui.js.
Also, I'm really not sure about the exit confirmation, not really needed and that's not like people might just lose their work because they exited. You can't exit from a movie so it is not an edge case as well.