added footnote support
minor cleanup