Clean up appended scripts in head.