restructuring BFSolver...more goodies to come