Minor changes in solver.
Added trace.