minor improvements to initialization, shut down of BDB-JE.