moved scripts at the bottom of the page into body