split toExMS(S) into (to be) CLI and GUI versions