added error page, set up template inheritance