Properly indexing of localStorage entries