Conservative manual merge of refactor-db into new dev, inmem-per-run-db