Started working on copied code from IndexedDB.