mostly format changes from move to python's json output
better json output. Recover summary at end