Solver works
Clean code