Fix JSON templates
Merge with style changes.