split up tbox from types
work-around for addOnTerminate
Merge pull request #59 from Olly-/master

added addOnTerminate and split TBox types up.