add templates.js and valgrind driver