Fixed the routine mps::solve() and added a more complete set of tests.