refactor to use header/footer ejs files
add header footer and error templates