Improves JavaScript code quality

Bug: 61619
Change-Id: I720b613f48ce29d4b63e4a4cd5c1c38bc351c4de
Merge "Improves JavaScript code quality"