JAL-3253 preliminary static fixes for JavaScript part 4 of 3