made headers and footers generate from the same code.
Merge pull request #56 from freemanirl/header-footer

made headers and footers generate from the same code.