rename HTMLTemplate to Quaff, and rewrite in js