Migrated most script loading to head.js.