support for returning layout attributes for header and footer
fix warning, fix copy-paste typo causing failures
refactor iterating attributes
Merge pull request #17 from 1aurabrown/header-footer

@ashfurrow => support for returning layout attributes for header and footer