cleaned up some old endpoints
if there is an error it gets thrown properly
added server.pre() to inject some global headers into the output