WIP on ensuring indexes in db.