added tests to mzid handler and fixed some issues on the way