Doc upgrades

Added a fix to make document linking compatible both with GitHub and sphinx.