Added setup of JavaScript modes from old init