More readable code in solver.cpp
Improving included headers in solver.cpp