Moving scripts out of the header into end of body