Bug fixes in doSM, modification to use classes

Fixed a bug in doSM.py due to which soft categories in mt were not considered correctly.

adapted doSM.py to use classes instead of os.system (first run, some system calls remain).