Add some unit tests, and make the solver working...