Clean up history.json