Made memory/berkeleydb store configurable for Main.