Changing code to handle Tcl stuff nicely.