Add more docstrings.
Fix edge case with multiple self links.
Merge branch 'master' into docstrings
Add more docstrings.