fixed mis-naming of template nab class selector in template.js and did other minor tweaks.