Refactor & debug option

Setting "debug":true in config.json will include the full context JSON
in the response.