Upgrade head.js, minor adjustments to other js files