improvements to repl_funScript.sml