Uses promises
Adds unsaved changes prompt