move scripts to bottom of each page

and counter