Moving javascripts to the end of the page