Refactor, add footnote ref code.
Refactor, add footnote ref code.