Solver constructor