Updated templates and js