Some fixes to use a each iterator. Add comments. Update template.js to add templateSettings to _.