Refactor so I can call the solver on real problems