Extract header/footer, layouts