db index wrangling and comments per issue #28