Added fix for highlight edge case and added persistent json.