added header, footer support

added header and footer support; some enhancements to paragraph
(allowing for carriage-returns and preserving spaces)