Modify solver
Fix tests