Fix some bugs in mpssolver.py and model.py. Compression and contraction now works fine.