Updating Template.  Fixing template assignment quotes and adding JSON encoding.