minor template updates, and (poorly().poorly()) written js addition