Added saving results to JSON.