Minor quicktemplate cleanup

* add comment explaining background

* fix JSHint warnings, including one bug in the attr handler