fixes + prepare for indexedDB use