Improve JSON output, and include average intensity metrics