Moved script loading to the end of each page.