tweaks and updates to codegen_CPP, BFSolver