Update BranchCollection documentation.
Update ReferenceCollection documentation.
Some more documentation fixes.
Rework some of the reference tests.
Add tests that show how ambiguous branch lookup works.