move js to external files