cleaned up type defintions and did a global search and replace for Tnode -> T