Fix merge bugs in js and remove old jquery