Internal tree representation of Session Types