lots of JS changes