bunch of js changes