move js scripts to end of file