clear output, change u->T and minor language tweaks