Move js to external script