First cut at the solver