Refactoring
Use IndexedDB