remove some debugging stuff from formatp
Remove unused render_json
Docstring for chain