added addOnTerminate and split TBox types up.