switching errorhandler to use markup templating engine
cleaning up usage