First pass at rewriting build_BDD non-recursively