More code and tests, IndexedDB writing of accounts.