Fixes and updates to HeadScript.