Move js to external file