minor advanced js changes