Fix footnotes in Spinx-doc documentation
add backreference, script updates
fix conflicts and merge with David's changes