Refactor relationship handling. Initial support for relation code-ref conditions.
Add caching of relationship _link info. Tidy NOTES. Update Changes.