move more footnote functions to footnotes.c