templating sort of implemented. Fixes #104
Forgot new js file for templating