Various fixes to TP visitor classes