Move JS to external file