lots of JS-related changes