Fix JavaScript to be jslint compliant

Change formatting so that jslint tests
can pass.

Change-Id: I4d0b84ce0d2854946a29543e6ee4d2f4bc1d8fc3