many updates to templates and js