more successful formatting including header, footer.
formatting touchup. all tests passing. Merge branch to master.