Copying the main JS from master.