Solver now returns in one place and uses constants for error codes.
The solver appears to be returning solutions properly.