refactoring the way from-to rx lookup works to be more efficient and support metastable states.
refactor some stuff
not quite done.
Added tests and python hooks
typo fix