Minor JS code style refactoring.