updating template to encode all variables
* moving template load to top of body
removing extra quotes around json encoded strings
Merge pull request #17 from jirafe/jir-760-beacon-code-to-body-top

updating template to encode all variables