Pretty plus working stats

Try/catch so that JavaScript clears document and writes sent HTML when JSON parse fails.