indexed-db: Better abstraction