Including mspai code from http://www5.in.tum.de/software/mspai/mspai-1.2.tar.gz