moved function generateCheckboxElementsFromArray() to templating helper script.
removed commented out markup.
converted templating function to template script.