Added persistence tests, close db, env in destructors