Making JS and Java API consistand with each other. These are JS specific
changes.