BDD improvements
updated from branch include_bdd