fix js counter to display calculated values on pre filled textareas
fix some js syntax warnings