added templates and js