Split the JavaScript code into two files