[m000646] FIX relationships

- 2500 & 2501 not reported or wrong
- code cleanup
- perf