Extracting the JS to a separate file