small improvements to Solver.main()