massive fix on indexeddb implementation and more tests