updated templates for js mode.