Fixed search paths.
Allowed headers and footers to be defined in the markup.
Formatting
Added flag to use template header and footers.