Small changes in the heuristics solver
Added threads support. And broke everything