Move javascript to *.js file