Updated code to add global header/footer and also added code to deal with javasript includes