added templating to views.js