added error pages. at least error 404 works.
made Template a singleton object.
fixed how $app is generated.
forgot exit after a good response.
added a badRequest and noService exception cases; added links to them.