JavaScript improvements.