Move JS to bottom of page

From #6234.