Multiple syntax fixes and additions for the TP visitor