save data on browser close
Merge branch 'rasmusPromise' into development