Refactored tensor discovery to be more direct in handing back discovered relationships. Otherwise, this is mainly changes to adjust to api/naming changes in tensor.