A bunch of functions to make IndexedDB a little more friendly