if logic/tcl logic cleanup.