Move javascript code into file in new assets/js directory