new tclmain
minor fixes to scripts